	
// This calls the date onblur function in the format the calendar creator wants
function calldateonblur(cal){
	cal.params.inputField.onblur();
	cal.destroy();
}	

	function do_clearJScal(theform,eleid){
		document.getElementById(eleid).value = '';
		document.getElementById('SD_'+ eleid).value = '';
		document.getElementById(eleid).onblur();
	}
	
	function do_JScalSet(showid,fmt,targetid,tfmt){
		//alert("date = " + showdate + " format= " + fmt);
		//var mydate = new Date;
	
		var showdate = document.getElementById(showid).value;
		var mydate = DateFromString(showdate,fmt);
		
		//alert(mydate.toString());
		//alert(mydate.print(tfmt));
		
		if(mydate != undefined){
			document.getElementById(targetid).value = mydate.print(tfmt);
			document.getElementById(targetid).onblur();
		}else{
			
		}
		
	}